package com.vf.admin.miaodong.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.miaodong.entity.GameSetting;
import com.vf.admin.utils.StringEx;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * 游戏设置
 */
@Repository
public class GameSettingDao extends BaseDao<GameSetting> {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    //详情
    public GameSetting get() {
        List<Object> paramList = new ArrayList<Object>();
        StringBuilder sbStr = new StringBuilder("SELECT * FROM game_setting  where id = 1 ");
        String sql = sbStr.toString();
        return this.queryObj(sql, paramList, GameSetting.class);
    }

    /**
     * 修改游戏参数
     */
    public void xiugai(String values) {
        ArrayList<Object> paramList = new ArrayList<Object>();
        StringBuilder sbSql = new StringBuilder("UPDATE game_setting SET zuanshinum = ?  WHERE id = 1  ");
        paramList.add(values);
        String sql = sbSql.toString();
        this.update(sql, paramList);

    }

}
